﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ItemSwordScr : MonoBehaviour
{
    public float ROT_SPEED = 360;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        transform.Rotate(0,ROT_SPEED*Time.deltaTime,0);
    }

    private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent<PlayerControl>())
        {
            other.SendMessage("OnGetSword",0);
            Destroy(gameObject);
        }
    }
}
